<script language="Javascript">
	function send(){
		document.getElementById('submit').disabled = (document.getElementById('vip').value<=0)?true:false;
	}
</script>
<?php
class Form_Supprimervip extends Zend_Form{
	public function init(){
		$this->setMethod('post');
		$this->setName('supprimerervip');
		
		$listeVip = VipsController::gatAllVipsAction();
		
		$affNom = new Zend_Form_Element_Select('vip');
		$affNom->setLabel('Vip : ')
						->setAttrib('onclick', "send();")
						->addMultiOption(0, "Selectionnez un vip");
		foreach($listeVip as $vip){
			$affNom ->addMultiOption($vip->VIP_NUMERO,$vip->VIP_NOM." ".$vip->VIP_PRENOM);
		}
		
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel('Supprimer');

		$this->addElements(array($affNom, $submit));		
		
		?>
		<script language="Javascript">
			send();
		</script>
		<?php 
		
		$this->setElementDecorators(array('ViewHelper','Description','Errors',
                   array(array('data'=>'HtmlTag'), array('tag' => 'td')),
                   array('Label', array('tag' => 'td')),
                   array(array('row'=>'HtmlTag'),array('tag'=>'tr'))));
        
		$submit->setDecorators(array(
				'ViewHelper','Description','Errors', array(array('data'=>'HtmlTag'),
				array('tag' => 'td','colspan'=>'2','align'=>'left')),
				array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
       ));
       
		
		$this->setDecorators(array('FormElements', array(array('data'=>'HtmlTag'),array('tag'=>'table')),'Form'));
	}
}